﻿using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium.Chrome;

namespace SeleniumTest
{
    /// <summary>
    /// Summary description for UnitTest1
    /// </summary>
    [TestClass]
    public class SeleniumSetup
    {
        private ChromeDriver driver;
        string path;
        [TestInitialize]
        public void Setup()
        {
            string projectname = "seleniumtesting111";
            string path = Directory.GetCurrentDirectory().Substring(0, Directory.GetCurrentDirectory().LastIndexOf(@"seleniumtesting111") + projectname.Length);
            ChromeOptions incognito = new ChromeOptions();
            incognito.AddArgument("--incognito");
            driver = new ChromeDriver(path, incognito);
        }

        [TestCleanup]
        public void CleanUp()
        {
            driver.Quit();
        }

        [TestMethod]
        public void TestMethod1()
        {
            string baseURL = "http://test.showyoucare.dk/";
            Assert.IsTrue(driver != null);
        }
    }
}
